<template>
	<view class="wf-box">
		<view class="head" :style="{ paddingTop: navBarHeight }">
			<view class="head-np">
				<view class="back" @click="back()">
					<image src="../../static/img/chat-09.png"></image>
				</view>
				<view class="title">{{type?'关注':'粉丝'}}</view>
				<view></view>
			</view>
		</view>

		<view class="main" :style="{ paddingTop: navBarHeight }">
			<view class="item" v-for="item in 10">
				<image src="@/static/img/avatar.png" mode="widthFix"></image>
				<view class="info">
					<view>
						<text>陈子豪</text>
						<image src="@/static/img/attention_icon.png" mode="widthFix"></image>
					</view>
					<view>0x550ba...4dc59c5</view>
				</view>
				<view class="btn" v-if="type">
					<uni-icons color="#999999" type="checkmarkempty" size="16"></uni-icons>
					<text>已关注</text>
				</view>
				<view class="btn2" v-else>
					<uni-icons color="#58A1FF" type="plusempty" size="16"></uni-icons>
					<text>回关</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import navBarMixin from '@/mixin/navBarMixin.js'
	export default {
		data() {
			return {
				type: !true
			}
		},
		mixins: [navBarMixin],
		onLoad(option) {
			console.log(option);
			if(option.type=='false') this.type = false
			if(option.type=='true') this.type = true
		},
		methods: {
			details() {
				uni.navigateTo({
					url: '/pages/me/rechargeDetails'
				})
			},
			back() {
				uni.navigateBack()
			}
		},
	}
</script>

<style lang="scss" scoped>
	.wf-box {
		overflow: hidden;

		.back {
			image {
				width: 20rpx;
				height: 37rpx;
			}
		}

		.head {
			position: fixed;
			z-index: 333;
			width: 100%;
			background: #fff;

			.head-np {
				display: flex;
				justify-content: space-between;
				align-items: center;
				width: 100%;
				height: 96rpx;
				padding: 0 30rpx;
				box-sizing: border-box;

				.title {
					font-size: 36rpx;
					font-weight: bold;
				}
			}
		}

		.main {
			// margin-top: 126rpx;
			margin-top: 246rpx;
			margin: 126rpx 30rpx 60rpx;
			padding: 30rpx 30rpx 60rpx;
			background-color: white;
			border-radius: 10rpx;

			.item {
				display: flex;
				align-items: center;
				border-bottom: 1rpx solid #EEEEEE;
				padding-bottom: 30rpx;
				margin-bottom: 30rpx;

				>image {
					width: 88rpx;
					margin-right: 20rpx;
				}

				.info {
					flex: 1;

					view {
						&:nth-of-type(1) {
							display: flex;
							align-items: center;

							image {
								width: 104rpx;
								margin-left: 12rpx;
							}
						}

						&:nth-of-type(2) {
							height: 36rpx;
							line-height: 36rpx;
							margin-top: 14rpx;
							font-size: 26rpx;
							color: #999999;
						}
					}
				}

				.btn {
					width: 138rpx;
					height: 50rpx;
					border-radius: 42rpx 42rpx 42rpx 42rpx;
					border: 1rpx solid #DDDDDD;
					display: flex;
					align-items: center;
					justify-content: center;
					font-size: 25rpx;
					color: #999999;
				}
				.btn2 {
					width: 125rpx;
					height: 50rpx;
					border-radius: 42rpx 42rpx 42rpx 42rpx;
					border: 1rpx solid #58A1FF;
					display: flex;
					align-items: center;
					justify-content: center;
					font-size: 25rpx;
					color: #58A1FF;
				}
			}
		}
	}
</style>